<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <meta HTTP-EQUIV="pragma" CONTENT="no-cache">
    <meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate,no-store">
    <meta HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta HTTP-EQUIV="expires" CONTENT="0">
    <meta name = "format-detection" content = "telephone=no">
    <title>购物车</title>
    <link rel="stylesheet" href="/Public/Home/css/cart.css?v=20170306002">
    <!--不识别数字为手机-->
<meta name="format-detection" content="telephone=no, email=no"/>
<!--通用js-->
<?php if(isset($signPackage) && !empty($signPackage)){ ?>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js?v=201704270010"></script>
<?php } ?>
<script type="text/javascript" src="/Public/Home/js/require.js"></script>
<script type="text/javascript" src="/Public/Home/js/baseLoading.js?v=201705240001"></script>
<script src="/Public/Home/js/jquery.min.js" ></script>
<script src="/Public/Home/js/pincode-input.js" ></script>
<script src="/Public/Home/js/parabola.js" ></script>
<script src="/Public/Home/js/lazyload/jquery.lazyload.min.js"></script>
<script type="text/javascript">
    _global.isLogin = !!"<?php echo $wx_member_id; ?>";
	var isWxShareDiy = typeof yc_share_diy === "undefined" ? false : yc_share_diy;
	var yc_wx_shareImgPath = "";
	<?php if(isset($weixin_logo) && !empty($weixin_logo)){ ?>
		yc_wx_shareImgPath = "/Uploads/<?php echo ($weixin_logo["image"]); ?>";
	<?php } ?>
    var yc_pass_arr = {'local_id':"<?php echo I('local_id',1);?>",'top_local_id':"<?php echo I('top_local_id',1);?>"};
	if(parseInt(yc_pass_arr["local_id"]) == 21){
		_global.isStopSell = true;
	}
    <?php if(isset($signPackage) && !empty($signPackage)){ ?>
        _global.isWeiXinLoad = true;
        var isEnableLocation = typeof yc_wx_location === "undefined" ? false : yc_wx_location;
        var yc_wx_options = {
            "enableLocation" : isEnableLocation,
            "refuseCallback" : function(){},
            "mapCallback" : function(){},
            "config" : {
                debug: false,
                appId: '<?php echo $signPackage["appId"];?>',
                timestamp: '<?php echo $signPackage["timestamp"];?>',
                nonceStr: '<?php echo $signPackage["nonceStr"];?>',
                signature: '<?php echo $signPackage["signature"];?>',
                jsApiList: [
                    'checkJsApi'
                ]
            }
        };
        var isInHeader = typeof yc_wx_useInHeader === "undefined" ? true : yc_wx_useInHeader;
        if(isInHeader){
            wxAutoConfig(yc_wx_options);
        }
    <?php } ?>
</script>
</head>

<?php if($no_goods == 1): ?><body style="background:white;">
<!-- 购物车为空的时候显示 -->
<div class="warp" >
    <div class="address">
        <div class="address-list">
<?php if($total["mobile"] != '' ): ?><!-- 有地址 -->

    <a class="address-item" href="<?php echo url('home/Address/index');?>" style="color:#232726;">
        <h3>收货人：<span><?php echo ($total["name"]); ?></span><span><?php echo ($total["mobile"]); ?></span></h3>
        <h4>收货地址:<?php echo ($total["area"]); echo ($total["addr"]); ?></h4>
    </a>
    <?php else: ?>
    <!-- 无地址 -->
    <a class="address-none"  href="<?php echo url('home/Address/index');?>" style="color:#232726;">
        <h3>暂无收货地址</h3>
        <h4 class="tips">为方便您更快收货，请填写收货地址额！</h4>
    </a><?php endif; ?>
        </div>
    </div>
</div>
<div class="empty-box">
    <img src="/Public/Home/images/iconEmpty.png" alt="">
    <p>购物车里什么也没有来挑几件好货吧！</p>
    <p>
        <a href="<?php echo url('/Home/store/index');?>" class="btn btn-hollow">去首页看看</a>
    </p>
</div>
<!-- 网站主菜单 -->
<link rel="stylesheet" href="/Public/Home/css/menu.css">
<div class="fixed-main-menu">

    <?php
 $home_default_local_id = (!empty($_GET['top_local_id']) && $_GET['top_local_id'] != '11') ? $_GET['top_local_id'] : $default_local_id; ?>
    <?php if ($_GET['local_id'] == '11'){ ?>
        <a href="<?php echo url('store/index',['local_id' => $home_default_local_id, 'top_local_id' => 11]);?>" class="home <?php echo CONTROLLER_NAME == 'Store' ? 'active' : ''; ?>"><span></span>
            <p>首页</p>
        </a>
    <?php }else { ?>
        <a href="<?php echo url('store/index',['local_id' => $storeData['local_id']]);?>" class="home <?php echo CONTROLLER_NAME == 'Store' ? 'active' : ''; ?>"><span></span>
            <p>首页</p>
        </a>
    <?php } ?>

    <?php if ($_GET['local_id'] == '11'){ ?>
    <a href="<?php echo url('category/index', ['local_id' => $home_default_local_id, 'top_local_id' => 11]);?>" class="category <?php echo CONTROLLER_NAME == 'Category' ? 'active' : ''; ?>"><span></span>
        <p>分类</p></a>
    <?php }else { ?>
    <a href="<?php echo url('category/index', ['local_id' => $storeData['local_id']]);?>" class="category <?php echo CONTROLLER_NAME == 'Category' ? 'active' : ''; ?>"><span></span>
        <p>分类</p></a>
    <?php } ?>

    <?php if ($_GET['local_id'] == '11'){ ?>
    <a href="<?php echo url('store/index', ['local_id' => '11']);?>" class="store-way <?php echo ($_GET['local_id'] == '11') ? 'active' : '';?>"><span></span><p>全国送</p></a>
    <?php }else { ?>
    <?php $top_local_id = (!empty($_GET['local_id'])) ? $_GET['local_id'] : $storeData['local_id']; ?>
    <a href="<?php echo url('store/index', ['local_id' => '11','top_local_id' => $top_local_id]);?>" class="store-way <?php echo ($_GET['local_id'] == '11') ? 'active' : '';?>"><span></span><p>全国送</p></a>
    <?php } ?>

    <a href="<?php echo url('carts/cart');?>" class="cart <?php echo CONTROLLER_NAME == 'Carts' ? 'active' : ''; ?> clickable_shou"><span></span>
        <p>购物车</p>

            <?php if(userCartNum()): ?><label class="public-cart-number"><?php echo userCartNum();?></label><?php endif; ?>
    </a>
    <a href="<?php echo url('Member/index');?>" class="mine <?php echo CONTROLLER_NAME == 'Member' ? 'active' : ''; ?> clickable_shou" id="menuMemberPopup"><span></span><p>我的</p></a>
</div>
<link rel="stylesheet" href="/Public/Home/css/phoneCheck.css">
<div class="alert-popup bindPhone">
    <p>你还没有绑定手机号，为了你更好的体验怡臣请先绑定手机号。</p>
    <p><a href="javascript:void(0);" class="cancel">先看看</a><a href="javascript:void(0);" class="confirm">绑定手机</a></p>
</div>
<div class="bindPhone-box" style="display:none">
    <span class="close"></span>
    <div class="inputInfo">
        <h1>验证手机号</h1>
        <ul>
            <li><input type="text" placeholder="请输入绑定手机号" id="phone"> <a href="javascript:void(0);" id="yzCaptcha">获取验证码</a></li>
            <li>
                <div class="pincode-input-container touch" id="pincode-list">
                    <div style="display: none;">
                        <input type="password" readonly pattern="[0-9]*" inputmode="numeric" id="preventautofill" autocomplete="off">
                    </div>
                    <div class="touchwrapper touch4">
                        <input type="password" pattern="[0-9]*" readonly inputmode="numeric" maxlength="4" autocomplete="off" class="form-control pincode-input-text">
                        <table class="touchtable">
                            <tbody>
                            <tr>
                                <td></td>
                                <td></td>
                                <td></td>
                                <td class="last"></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="text-danger pincode-input-error"></div>
                </div>
                <input type="text" id="code-input" style="display:none;">
                <p class="code-tips" style="display:none;"></p>
            </li>
        </ul>
    </div>
    <div class="success" style="display:none;">
        <ul>
            <li>
                <span>绑定成功!</span>
                <p>该窗口<i>3</i>秒后自动关闭</p>
            </li>
        </ul>
    </div>
</div>

<script type="text/javascript">
    $(".clickable_shou").click(function(e){
        _global.checkPhoner.reset();
        _global.checkPhoner.run(e, $(this).attr('href'));
    });
</script>


<script type="text/javascript">
    require(['cart']);
</script>
</body>

<?php else: ?>



<body>
<div class="warp" style="padding-bottom:3rem;">
    <!-- 配送地址 -->
    <div class="address">
        <div class="address-list">

            <?php if($total["mobile"] != '' ): ?><!-- 有地址 -->

                <a class="address-item" href="<?php echo url('home/Address/index');?>" style="color:#232726;">
                    <h3>收货人：<span><?php echo ($total["name"]); ?></span><span><?php echo ($total["mobile"]); ?></span></h3>
                    <h4>收货地址:<?php echo ($total["area"]); echo ($total["addr"]); ?></h4>
                </a>
             <?php else: ?>
                <!-- 无地址 -->
                <a class="address-none"  href="<?php echo url('home/Address/index');?>" style="color:#232726;">
                    <h3>暂无收货地址</h3>
                    <h4 class="tips">为方便您更快收货，请填写收货地址额！</h4>
                </a><?php endif; ?>
        </div>
    </div>
    <!-- 购物车内容 -->
    <div class="cart-content">
        <!-- 店铺分割 -->
        <?php if(is_array($cart_detail)): $i = 0; $__LIST__ = $cart_detail;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$acart): $mod = ($i % 2 );++$i; if($acart['is_self'] != 1): ?><div class="shop-cart" data-lid="<?php echo ($acart["local_id"]); ?>">
            <div class=" <?php if($acart["shop_checkd"] == 1): ?>shop-choice active<?php else: ?> shop-choice<?php endif; ?>  "    data-lid="<?php echo ($acart["local_id"]); ?>"><?php echo ($acart["local_name"]); ?></div>

                <?php if($acart['local_id'] != 11): ?><div class="logistic-choice">
                            <label>配送方式：</label>
                            <span id="logStatus" class='logStatus' <?php if($acart["shipping"] == 1): ?>key="1">送货上门</span><?php else: ?>   key="2">我要自提</span><?php endif; ?>
                           <!-- <span id="logStatus" class='logStatus' key="1">送货上门</span>-->
                            <div class="logistic-popup">
                                <a href="javascript:void(0);" ></a>
                                <a href="javascript:void(0);" data-local=<?php echo ($acart['local_id']); ?> key="1">送货上门</a>
                                <a href="javascript:void(0);" data-local=<?php echo ($acart['local_id']); ?> class="active" key="2">我要自提</a>
                            </div>
                        </div>
                  <?php else: ?>
                        <div class="logistic-choice">
                            <label>配送方式：</label>
                             <span>送货上门</span>
                        </div><?php endif; ?>

            <div class="shop-cart-list" style="position:relative;z-index:1;">
                <!-- 单个商品 -->
                <?php if(is_array($acart["products"])): $i = 0; $__LIST__ = $acart["products"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$product): $mod = ($i % 2 );++$i; if($product['type'] == 0 || $product['type'] == 2 ): ?><div <?php if($product["active"] == 0 ): ?>class="single-outrange yc-data-item"<?php else: ?>class="single-item dataItem yc-data-item"<?php endif; ?> data-cid ='<?php echo ($product["id"]); ?>' data-pid ='<?php echo ($product["product_id"]); ?>'  data-lid ='<?php echo ($product["local_id"]); ?>'>
                            <div class="swipe-item">
                                <div class="choice-btn <?php if($product["ischeck"] == 1 && $product["active"] != 0): ?>active<?php endif; ?>" value = "<?php echo ($product["local_id"]); ?>,<?php echo ($product["product_id"]); ?>"></div>

                                <a href="<?php echo url('goods/detail',['id'=>$product['store_pid'], 'local_id' => $storeData['local_id']]);?>" class="img <?php if($product['type']==2){ echo $product['initnum'] <=0 ? 'img sold_out' : '';}else{ echo ($product['store']-$product['freez']) <=0 ? 'img sold_out' : '';} ?>"><img class="img-lazyload" src="/Public/Home/images/blank.png" data-original="<?php echo (getthumb($product["goods_id"])); ?>"></a>


                                <div class="goods-text">
                                    <a href="<?php echo url('goods/detail',['id'=>$product['store_pid'], 'local_id' => $storeData['local_id']]);?>" class="name text-hide"><?php echo ($product["name"]); ?></a>
                                    <p class="norms"><?php echo ($product["spec_info"]); ?></p>
                                    <p class="notice" >该商品不在配送区域</p>
                                    <p class="price" id="goods_value" value="<?php echo (number_format($product["final_price"], 2, '.', '')); ?>">¥<?php echo (number_format($product["final_price"], 2, '.', '')); ?></p>
                                    <p class="change-number">
                                        <a href="javascript:void(0);"   class="plus">+</a>
                                        <input type="number" value="<?php echo ($product["cart_num"]); ?>" id="goods_number" class='goods_number' readonly>
                                   <a href="javascript:void(0);"   class="minus">-</a>
                                    </p>
                                </div>
                            </div>
                            <div class="static-item">
                                <a href="javascript:void(0);" class="delete" data-id="<?php echo ($product["id"]); ?>">删除</a>
                                <a href="javascript:void(0);" class="collect" data-pid ='<?php echo ($product["product_id"]); ?>' data-lid ='<?php echo ($product["local_id"]); ?>' >收藏</a>
                            </div>
                        </div><?php endif; ?>


                    <?php if($product['type'] == 1): ?><div class="<?php if($product["active"] == 1): ?>group-item dataItem yc-data-item<?php else: ?>group-outrange yc-data-item<?php endif; ?> " data-cid ='<?php echo ($product["id"]); ?>'  data-lid ='<?php echo ($product["local_id"]); ?>'>
                            <div class="swipe-item">
                                <div class="group-des"><span>组合套餐</span><label><?php echo ($product["name"]); ?></label></div>
                                <div class="item-box">
                                    <div class="choice-btn <?php if($product['ischeck'] == 1 && $product["active"] != 0): ?>active<?php endif; ?>"></div>
                                    <div class="item-content">

                                        <?php if(is_array($product["group_products"])): $i = 0; $__LIST__ = $product["group_products"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$gProduct): $mod = ($i % 2 );++$i;?><div class="goods-item">
                                            <a href="<?php echo url('goods/detail',['id'=>$gProduct['store_pid'], 'local_id' => $storeData['local_id']]);?>" class="img <?php if($gProduct['type']==2){ echo $gProduct['initnum'] <=0 ? 'img sold_out' : '';}else{ echo ($gProduct['store']-$gProduct['freez']) <=0 ? 'img sold_out' : '';} ?>"><img class="img-lazyload" src="/Public/Home/images/blank.png" data-original="<?php echo (getthumb($gProduct["goods_id"])); ?>"></a>
                                            <div class="goods-text">
                                                <a href="<?php echo url('goods/detail',['id'=>$gProduct['store_pid'], 'local_id' => $storeData['local_id']]);?>" class="name text-hide"><?php echo ($gProduct["product_name"]); ?></a>
                                                <p class="norms"><?php echo ($gProduct["spec_info"]); ?></p>
                                                <p class="notice"  >该商品不在配送区域</p>
                                                <p class="price clearfix">
                                                    <span class="fl" id="group_item_value" >￥<?php echo (number_format($gProduct["price"], 2, '.', '')); ?></span>
                                                    <input type="text" value="1" style="visibility:hidden;" id="hide_number">
                                                    <span class="fr" id="group_item_number"><?php echo ($gProduct["num"]); ?></span>
                                                </p>
                                                <label class="hidesingle"></label>
                                            </div>
                                        </div><?php endforeach; endif; else: echo "" ;endif; ?>
                                        <div class="group-total">
                                            <p class="fl">套餐价:<label id="goods_value">￥<?php echo (number_format($product["final_price"], 2, '.', '')); ?></label></p>

                                            <p class="change-number">
                                                <a href="javascript:void(0);" class="plus">+</a>
                                                <input type="number" value="<?php echo ($product["cart_num"]); ?>" id="goods_number" class="goods_number" readonly>
                                                <a href="javascript:void(0);" class="minus">-</a>
                                            </p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="static-item">
                                <a href="javascript:void(0);" class="delete" data-id="<?php echo ($product["id"]); ?>">删除</a>

                            </div>
                        </div><?php endif; endforeach; endif; else: echo "" ;endif; ?>
            </div>



            <div class="shop-settlement">
                <?php if($acart['store_dot_name'] != ''): ?><span class="ship_fee">(免运费)</span>
                <?php else: ?>
                    <span class="ship_fee">(不含运费)</span><?php endif; ?>


                <span>应付:<label class="shop-goods-price">￥<?php echo (number_format($acart["lp_fee"], 2, '.', '')); ?></label></span>
            </div>

        </div>
         <?php elseif($acart['is_self'] == 1): ?>
                <?php  $isNeedId = false; ?>
            <!--全国送-->
            <div class="shop-cart" data-lid="<?php echo ($acart["local_id"]); ?>">
                <div class=" <?php if($acart["shop_checkd"] == 1): ?>shop-choice active<?php else: ?> shop-choice<?php endif; ?>  "    data-lid="<?php echo ($acart["local_id"]); ?>"><?php echo ($acart["local_name"]); ?></div>

                <?php if($acart['is_self'] != 1): ?><div class="logistic-choice">
                        <label>配送方式：</label>
                        <span id="logStatus" class='logStatus' <?php if($acart["shipping"] == 1): ?>key="1">送货上门</span><?php else: ?>   key="2">我要自提</span><?php endif; ?>
                        <!-- <span id="logStatus" class='logStatus' key="1">送货上门</span>-->
                        <div class="logistic-popup">
                            <a href="javascript:void(0);" ></a>
                            <a href="javascript:void(0);" data-local=<?php echo ($acart['local_id']); ?> key="1">送货上门</a>
                            <a href="javascript:void(0);" data-local=<?php echo ($acart['local_id']); ?> class="active" key="2">我要自提</a>
                        </div>
                    </div>
                    <?php else: ?>

                    <div class="logistic-choice set-nation">
                        <label>配送方式：</label>
                        <span class="logStatus">送货上门</span>
                    </div><?php endif; ?>

                <div class="shop-cart-list" style="position:relative;z-index:1;">
                    <!-- 单个商品 -->
                    <?php if(is_array($acart["products"])): $i = 0; $__LIST__ = $acart["products"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$product): $mod = ($i % 2 );++$i; if($product['type'] == 0 || $product['type'] == 2 ): ?><div <?php if($product["active_ident"] != 1 ): ?>class="single-outrange yc-data-item"<?php else: ?>class="single-item dataItem yc-data-item"<?php endif; ?> data-cid ='<?php echo ($product["id"]); ?>' data-pid ='<?php echo ($product["product_id"]); ?>'  data-lid ='<?php echo ($product["local_id"]); ?>'>
                            <div class="swipe-item">
                                <div class="choice-btn <?php if($product["ischeck"] == 1 && $product["active_ident"] == 1): ?>active<?php endif; ?>" value = "<?php echo ($product["local_id"]); ?>,<?php echo ($product["product_id"]); ?>"></div>

                <a href="<?php echo url('goods/detail',['id'=>$product['store_pid'], 'local_id' => $storeData['local_id']]);?>" class="img <?php if($product['type']==2){ echo $product['initnum'] <=0 ? 'img sold_out' : '';}else{ echo ($product['store']-$product['freez']) <=0 ? 'img sold_out' : '';} ?>"><img class="img-lazyload" src="/Public/Home/images/blank.png" data-original="<?php echo (getthumb($product["goods_id"])); ?>"></a>


                <div class="goods-text">
                    <a href="<?php echo url('goods/detail',['id'=>$product['store_pid'], 'local_id' => $storeData['local_id']]);?>" class="name text-hide"><?php echo ($product["name"]); ?></a>
                    <p class="norms text-hide"><?php echo ($product["spec_info"]); ?></p>
                    <p class="notice" >该海淘商品需上传身份证！</p>
                    <?php if($product['active_ident'] != 1){ $isNeedId = true; } ?>
                    <p class="upload-identity" data-state-id="<?php echo ($product['active_ident']); ?>">立即上传</p>
                    <p class="price" id="goods_value" <?php if($product["active_ident"] != 1): ?>style="display:none"<?php endif; ?> value="<?php echo (number_format($product["final_price"], 2, '.', '')); ?>">¥<?php echo (number_format($product["final_price"], 2, '.', '')); ?></p>
                    <p class="change-number" <?php if($product["active_ident"] != 1): ?>style="display:none"><?php endif; ?>>
                        <a href="javascript:void(0);"   class="plus">+</a>
                        <input type="number" value="<?php echo ($product["cart_num"]); ?>" id="goods_number" class='goods_number' readonly>
                        <a href="javascript:void(0);"   class="minus">-</a>
                    </p>
                </div>
            </div>
            <div class="static-item">
                <a href="javascript:void(0);" class="delete" data-id="<?php echo ($product["id"]); ?>">删除</a>
                <a href="javascript:void(0);" class="collect" data-pid ='<?php echo ($product["product_id"]); ?>' data-lid ='<?php echo ($product["local_id"]); ?>' >收藏</a>
            </div>
            </div><?php endif; ?>


            <?php if($product['type'] == 1): ?><div class="<?php if($product["active_ident"] == 1): ?>group-item dataItem yc-data-item<?php else: ?>group-outrange yc-data-item<?php endif; ?> " data-cid ='<?php echo ($product["id"]); ?>'  data-lid ='<?php echo ($product["local_id"]); ?>'>
                    <div class="swipe-item">
                        <div class="group-des"><span>组合套餐</span><label><?php echo ($product["name"]); ?></label></div>
                        <div class="item-box">
                            <div class="choice-btn <?php if($product['ischeck'] == 1 && $product["active_ident"] != 0): ?>active<?php endif; ?>"></div>
            <div class="item-content">

                <?php if(is_array($product["group_products"])): $i = 0; $__LIST__ = $product["group_products"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$gProduct): $mod = ($i % 2 );++$i;?><div class="goods-item">
                        <a href="<?php echo url('goods/detail',['id'=>$gProduct['store_pid'], 'local_id' => $storeData['local_id']]);?>" class="img <?php if($gProduct['type']==2){ echo $gProduct['initnum'] <=0 ? 'img sold_out' : '';}else{ echo ($gProduct['store']-$gProduct['freez']) <=0 ? 'img sold_out' : '';} ?>"><img class="img-lazyload" src="/Public/Home/images/blank.png" data-original="<?php echo (getthumb($gProduct["goods_id"])); ?>"></a>
                        <div class="goods-text">
                            <a href="<?php echo url('goods/detail',['id'=>$gProduct['store_pid'], 'local_id' => $storeData['local_id']]);?>" class="name text-hide"><?php echo ($gProduct["product_name"]); ?></a>
                            <p class="norms text-hide"><?php echo ($gProduct["spec_info"]); ?></p>
                            <p class="notice">该海淘商品需上传身份证！</p>
                            <?php if($gProduct['active_ident'] != 1){ $isNeedId = true; } ?>
                            <p class="upload-identity"  data-state-id="<?php echo ($gProduct['active_ident']); ?>">立即上传</p>
                            <p class="price  clearfix" <?php if($gProduct["active_ident"] != 1): ?>style="display:none"<?php endif; ?>>
                                <span class="fl" id="group_item_value">￥<?php echo (number_format($gProduct["price"], 2, '.', '')); ?></span>
                                <input type="text" value="1" style="visibility:hidden;" id="hide_number">
                                <span class="fr" id="group_item_number"><?php echo ($gProduct["num"]); ?></span>
                            </p>
                            <label class="hidesingle"></label>
                        </div>
                    </div><?php endforeach; endif; else: echo "" ;endif; ?>
                <div class="group-total" <?php if($gProduct["active_ident"] != 1): ?>style="display:none"<?php endif; ?>>
                    <p class="fl">套餐价:<label id="goods_value"><?php if($gProduct["active_ident"] != 1): ?>￥0.00<?php else: ?>￥<?php echo (number_format($product["final_price"], 2, '.', '')); endif; ?></label></p>
                    <p class="change-number">
                        <a href="javascript:void(0);" class="plus">+</a>
                        <input type="number" value="<?php echo ($product["cart_num"]); ?>" id="goods_number" class="goods_number" readonly>
                        <a href="javascript:void(0);" class="minus">-</a>
                    </p>
                </div>
            </div>
            </div>
            </div>
            <div class="static-item">
                <a href="javascript:void(0);" class="delete" data-id="<?php echo ($product["id"]); ?>">删除</a>
            </div>
            </div><?php endif; endforeach; endif; else: echo "" ;endif; ?>
            </div>

            <div class="shop-settlement">
                <?php if($acart['store_dot_name'] != ''): ?><span class="ship_fee">(免运费)</span>
                    <?php else: ?>
                    <span class="ship_fee">(不含运费)</span><?php endif; ?>
                <span>应付:<label class="shop-goods-price">￥<?php echo (number_format($acart["lp_fee"], 2, '.', '')); ?></label></span>
            </div>

            </div><?php endif; endforeach; endif; else: echo "" ;endif; ?>
        <!-- 过期商品 -->
        <div class="outTime-goods mgTop">
            <?php if(is_array($out_time)): $i = 0; $__LIST__ = $out_time;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$acart): $mod = ($i % 2 );++$i;?><div class="outTime-item clearfix" data-cid="<?php echo ($acart['id']); ?>">
                            <div class="out-label"></div>
                           <img class="img-lazyload" src="/Public/Home/images/blank.png" data-original="<?php echo (getthumb($acart["goods_id"])); ?>">
                            <div class="goods-text">
                                <p class="name text-hide"><?php echo ($acart["name"]); ?></p>
                                <p class="norms"><?php echo ($acart["spec_info"]); ?></p>
                              <!--  <a href="javascript:void(0);" class="delete" data-id="<?php echo ($acart["id"]); ?>">删除</a>-->
                            </div>
                        </div><?php endforeach; endif; else: echo "" ;endif; ?>

            <?php if($out_time_len != 0): ?><div class="outTime-all">
                <a href="javascript:void(0)">清除失效商品</a>
            </div><?php endif; ?>
        </div>
    </div>

    <?php if($no_goods == 0): ?><div class="clear-demo"><a href="javascript:void(0)" class="clearCart">清空购物车</a></div><?php endif; ?>
</div>

<!-- 购物车合计 -->
<div class="cart-settment clearfix">
    <div class="left-text">
        <a href="javascript:void(0);" class="all-choice <?php if($all_check == 1): ?>active<?php endif; ?>">全选</a>
        <div>
            <h2>合计：<label id="cart-total-value">￥<span><?php echo (number_format($total["goods_total_fee"], 2, '.', '')); ?></span></label></h2>
        </div>
    </div>
    <a href="javascript:void(0);" class="settment-btn">提交订单</a>
</div>
<!-- 编辑状态下底部选择 -->
<div class="fixed-bot-modify" style="display:none;">
    <div class="left-text">
        <a href="javascript:void(0);" class="all-delete">全选</a>
    </div>
    <div class="right-operate">
        <a href="javascript:void(0);" class="delete-btn">删除</a>
        <a href="" class="like-btn">移入喜欢</a>
    </div>
</div>
<!-- 右侧浮动按钮 -->
<!--<div class="fixed-right-btn">
    <a href="javascript:void(0);" class="fixed-modify">编辑</a>
    <a href="javascript:void(0);" class="fixed-complete" style="display:none;">完成</a>
</div>-->
<!-- 提示弹窗 -->
<div class="alert-popup">
    <p>是否从购物车删除所选商品</p>
    <p><a href="javascript:void(0);" class="cancel">取消</a><a href="javascript:void(0);" class="confirm">确定</a></p>
</div>




<?php if($isNeedId){ ?>
<!-- 身份验证 -->
<?php $sfNeedJs = array("validate" => true, "upload" => true);?>
<link rel="stylesheet" href="/Public/Home/css/uploadIdentitly.css?v=20170306001">
<!-- 上传身份证弹窗 -->
<div class="upload-identity-frame" style="display: none;">
    <p class="identitly-title">
        <span>海淘实名认证</span>
        <a href="javascript:void(0)" class="close"></a>
    </p>
    <div class="upload-identity-content">
        <div class="upload-identity-ret">
            <p class="indetitly-tips">海关要求购买跨境商品需提供实名信息额</p>
            <input type="text" id="yc_sf_name" value="" placeholder="请输入真实姓名" />
            <input type="text" id="yc_sf_id" placeholder="第二代身份证号（将加密处理）"/>
            <div class="identitly-state">
                <p>请上传身份证正反面共两张图片</p>
                <div class="indetitly-cardimg">
                    <!--正面-->
                    <div class="upload-content-box">
                        <div class="upload-file-list frontpicImg"></div>
                        <i class="upload-btn" id="ycSfFrontBtn">
                            <span>正面</span>
                            <input id='ycSfFrontPic' type='hidden' value='' />      
                            <!-- <input id="ycSfFrontBtn" type="file" accept="image/*" name="file" /> -->
                        </i>
                    </div>
                    <!--反面-->
                    <div class="upload-content-box">
                        <div class="upload-file-list backpicImg"></div>
                        <i class="upload-btn" id="ycSfBackBtn">
                            <span>反面</span>
                            <input id='ycSfBackPic' type='hidden' value='' />                     
                            <!-- <input id="ycSfBackBtn" type="file" accept="image/*" name="file" /> -->
                        </i>
                    </div>
                </div>
                <p class="gray">温馨提示：请勿剪裁涂改照片，保证身份信息清晰显示，否则无法通过审核。</p>
            </div>
        </div>
        <div class="indetitly-mes">
            <h3>为什么需要实名认证？</h3>
            <p>根据海关要求，购买跨境商品需要对订购人进行实名认证，错误信息可能导致无法正常清关。</p>
            <p>你的身份证信息将加密保管，怡臣优选保证信息安全，绝不对外泄漏！</p>
            <p>任何身份认证可联系我们400-023-1666（09:00-18:00）</p>
        </div>
    </div>
    <div id="ycSfUpload" class="upload-submit btn btn-primary">确定</div>
</div>
<?php if(sfNeedJs["validate"]){ ?>
<script type="text/javascript" src="/Public/Home/js/validate.js"></script>
<?php } ?>
<script type="text/javascript" src="/Public/Home/js/cart/identitlyCard.js??v=201704270001"></script>
<?php } ?>
<!-- 网站主菜单 -->
<link rel="stylesheet" href="/Public/Home/css/menu.css">
<div class="fixed-main-menu">

    <?php
 $home_default_local_id = (!empty($_GET['top_local_id']) && $_GET['top_local_id'] != '11') ? $_GET['top_local_id'] : $default_local_id; ?>
    <?php if ($_GET['local_id'] == '11'){ ?>
        <a href="<?php echo url('store/index',['local_id' => $home_default_local_id, 'top_local_id' => 11]);?>" class="home <?php echo CONTROLLER_NAME == 'Store' ? 'active' : ''; ?>"><span></span>
            <p>首页</p>
        </a>
    <?php }else { ?>
        <a href="<?php echo url('store/index',['local_id' => $storeData['local_id']]);?>" class="home <?php echo CONTROLLER_NAME == 'Store' ? 'active' : ''; ?>"><span></span>
            <p>首页</p>
        </a>
    <?php } ?>

    <?php if ($_GET['local_id'] == '11'){ ?>
    <a href="<?php echo url('category/index', ['local_id' => $home_default_local_id, 'top_local_id' => 11]);?>" class="category <?php echo CONTROLLER_NAME == 'Category' ? 'active' : ''; ?>"><span></span>
        <p>分类</p></a>
    <?php }else { ?>
    <a href="<?php echo url('category/index', ['local_id' => $storeData['local_id']]);?>" class="category <?php echo CONTROLLER_NAME == 'Category' ? 'active' : ''; ?>"><span></span>
        <p>分类</p></a>
    <?php } ?>

    <?php if ($_GET['local_id'] == '11'){ ?>
    <a href="<?php echo url('store/index', ['local_id' => '11']);?>" class="store-way <?php echo ($_GET['local_id'] == '11') ? 'active' : '';?>"><span></span><p>全国送</p></a>
    <?php }else { ?>
    <?php $top_local_id = (!empty($_GET['local_id'])) ? $_GET['local_id'] : $storeData['local_id']; ?>
    <a href="<?php echo url('store/index', ['local_id' => '11','top_local_id' => $top_local_id]);?>" class="store-way <?php echo ($_GET['local_id'] == '11') ? 'active' : '';?>"><span></span><p>全国送</p></a>
    <?php } ?>

    <a href="<?php echo url('carts/cart');?>" class="cart <?php echo CONTROLLER_NAME == 'Carts' ? 'active' : ''; ?> clickable_shou"><span></span>
        <p>购物车</p>

            <?php if(userCartNum()): ?><label class="public-cart-number"><?php echo userCartNum();?></label><?php endif; ?>
    </a>
    <a href="<?php echo url('Member/index');?>" class="mine <?php echo CONTROLLER_NAME == 'Member' ? 'active' : ''; ?> clickable_shou" id="menuMemberPopup"><span></span><p>我的</p></a>
</div>
<link rel="stylesheet" href="/Public/Home/css/phoneCheck.css">
<div class="alert-popup bindPhone">
    <p>你还没有绑定手机号，为了你更好的体验怡臣请先绑定手机号。</p>
    <p><a href="javascript:void(0);" class="cancel">先看看</a><a href="javascript:void(0);" class="confirm">绑定手机</a></p>
</div>
<div class="bindPhone-box" style="display:none">
    <span class="close"></span>
    <div class="inputInfo">
        <h1>验证手机号</h1>
        <ul>
            <li><input type="text" placeholder="请输入绑定手机号" id="phone"> <a href="javascript:void(0);" id="yzCaptcha">获取验证码</a></li>
            <li>
                <div class="pincode-input-container touch" id="pincode-list">
                    <div style="display: none;">
                        <input type="password" readonly pattern="[0-9]*" inputmode="numeric" id="preventautofill" autocomplete="off">
                    </div>
                    <div class="touchwrapper touch4">
                        <input type="password" pattern="[0-9]*" readonly inputmode="numeric" maxlength="4" autocomplete="off" class="form-control pincode-input-text">
                        <table class="touchtable">
                            <tbody>
                            <tr>
                                <td></td>
                                <td></td>
                                <td></td>
                                <td class="last"></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="text-danger pincode-input-error"></div>
                </div>
                <input type="text" id="code-input" style="display:none;">
                <p class="code-tips" style="display:none;"></p>
            </li>
        </ul>
    </div>
    <div class="success" style="display:none;">
        <ul>
            <li>
                <span>绑定成功!</span>
                <p>该窗口<i>3</i>秒后自动关闭</p>
            </li>
        </ul>
    </div>
</div>

<script type="text/javascript">
    $(".clickable_shou").click(function(e){
        _global.checkPhoner.reset();
        _global.checkPhoner.run(e, $(this).attr('href'));
    });
</script>


<script type="text/javascript">
	require(['cart']);
</script>

<input type="hidden" class = 'catUrl' data-id="<?php echo U('home/carts/cartNum');?>">

<script>

    $('.outTime-all a').on('click',function () {
        var cids = new Array();
        var i=0;
        $('.outTime-item').each(function () {
            var dup=false;
           for(var j=0;j<i;j++){
               if($(this).data('cid')==cids[j]){
                   dup=true;
               }

           }
           if(!dup){
               cids[i++] = $(this).data('cid');
           }
            //console.log($(this).data('cid'));
        })
        $.ajax({
            url:"<?php echo U('home/carts/removeOuttimeCart');?>",
            type:'post',
            data:{'cids':cids},
            datatype:'json',
            success:function(data){
                if(data['no_goods']){
                    window.location.reload();
                }
                if(data['out_time'][0]){
                    alert('删除失败');
                }else{
                    $('.outTime-goods').remove();
                }
            },
            error:function(){
                alert('无法删除');
            }
        })

    })
</script>



</body><?php endif; ?>
<!-- <script>
    $(function () {
        var rnumber = Math.floor(Math.random()*1000);
        history.replaceState({mod: rnumber}, 'Title', '?mod='+rnumber);
    })
</script>-->

</html>